/**
 * Created by ibm on 2015/8/29.
 */
if(dev) {
    console.info('加载', 'comment/template.js');
}
var source=
    '<%for( k = 0; k < dataArray.length; k++) {%>'+
        '<%if(k==0){%>'+
          '<div class="newsItem" style="padding-top: 0px;background: #F3F8F7;border: 0px;">'+
            '<div class="thesisInfo" style="margin: 0px 0px 0px 0px;">'+
                '<p class="title">'+
                    '<a href="javascript:void(0);" onclick="detail(<%=dataArray[k].paper.id%>);"><%=dataArray[k].paper.title%></a>'+
                '</p>'+
                '<p class="author">'+
                    '<%if(dataArray[k].paper.authors!=null){%>'+
                        '<%for( m=0;m<dataArray[k].paper.authors.length;m++){%>'+
                            '<span><a href="javascript:void(0);" onclick="authorsPapers(\'<%=dataArray[k].paper.authors[m]%>\');"><%=dataArray[k].paper.authors[m]%></a></span>' +
                            '<%if(m!=(dataArray[k].paper.authors.length-1)){%>'+
                                '<em>·</em>'+
                            '<%}%>'+
                        '<%}%>'+
                    '<%}%>'+
                '</p>'+
            '</div>'+
            '<script type="text/javascript">$("#defaultReply").hide();</script>'+
        /*'<div class="reply-floor1">'+
        '<%if(dataArray[k].account.avatarUrl!=null){%>'+
        '<img src="researcher/<%=dataArray[k].account.avatarUrl%>" class="pic-small fl">'+
        '<%}else{%>'+
        '<img src="../static/images/photo2.png" class="pic-small fl">'+
        '<%}%>'+
        '<div class="fl reply-name-time">'+
        '<p class="replyname"><%=dataArray[k].account.firstName%></p>'+
        '<p class="replytime" id="two_replytime<%=dataArray[k].id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[k].updateTime%>","two_replytime<%=dataArray[k].id%>")</script></p>'+
        '</div>'+
        '<div class="reply-floor1-content">'+
        ':&nbsp;&nbsp;<%=dataArray[k].content%>'+
        '</div>'+
        '<textarea class="reply-textarea" placeholder="Reply <%=dataArray[k].account.firstName%> :"></textarea>'+
        '<a href="javascript:void(0);" data="<%=dataArray[k].paper.id%>-<%=dataArray[k].id%>" class="sendbtn">Send</a>'+
        '</div>'+*/
        '<div>'+
        '<textarea class="reply-textarea" placeholder="Reply"></textarea>'+
        '<a href="javascript:void(0);" data="'+$.getUrlParam("paperId")+'-" id="mainSend"  class="sendbtn">Send</a>'+
        '</div>'+
        '</div>'+
        '<%}%>'+
    '<%}%>'+
    '<%for( i = 0; i < dataArray.length; i++) {%>'+
        '<div class="newsItem">'+
        '<a class="close" id="regclose" ' +
        'href="javascript:void(0);" data="<%=dataArray[i].paper.id%>-<%=dataArray[i].id%>" onclick="deleteComment(this);"'+
        'style="float: right;margin-right: 10px;margin-top: -30px;cursor: pointer;">'+
            '<img src="static/images/cancel.png" alt="关闭"/>'+
        '</a>'+
        /*'<div class="replyinfo">'+
            '<%if(dataArray[i].account.avatarUrl!=null){%>'+
            '<img src="researcher/<%=dataArray[i].account.avatarUrl%>" class="pic-big fl">'+
            '<%}else{%>'+
            '<img src="../static/images/photo2.png" class="pic-big fl">'+
            '<%}%>'+
            '<div class="fl reply-name-time">'+
                '<p class="replyname"><%=dataArray[i].account.firstName%><span class="repplyed">Reply</span></p>'+
                '<p class="replytime" id="one_replytime<%=dataArray[i].id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].updateTime%>","one_replytime<%=dataArray[i].id%>")</script></p>'+
            '</div>'+
           // '<a href="javascript:void(0);" class="replybtn">Reply</a>'+
        '</div>'+
        '<div class="thesisInfo">'+
            '<p class="title">'+
                '<a href="javascript:void(0);" onclick="detail(<%=dataArray[i].paper.id%>);"><%=dataArray[i].paper.title%></a>'+
            '</p>'+
            '<p class="author">'+
                '<%if(dataArray[i].paper.authors!=null){%>'+
                    '<%for( j=0;j<dataArray[i].paper.authors.length;j++){%>'+
                        '<span><%=dataArray[i].paper.authors[j]%></span>' +
                            '<%if(j!=(dataArray[i].paper.authors.length-1)){%>'+
                                '<em>·</em>'+
                            '<%}%>'+
                    '<%}%>'+
                '<%}%>'+
            '</p>'+
        '</div>'+*/
        '<%if(dataArray[i].preAccount!=null){%>'+
            '<div class="reply-floor1">'+
                '<%if(dataArray[i].preAccount.avatarUrl!=null){%>'+
                '<img src="researcher/<%=dataArray[i].preAccount.avatarUrl%>" class="pic-small fl">'+
                '<%}else{%>'+
                '<img src="../static/images/photo2.png" class="pic-small fl">'+
                '<%}%>'+
                    '<div class="fl reply-name-time">'+
                        '<p class="replyname"><%=dataArray[i].preAccount.firstName%></p>'+
                        '<p class="replytime" id="two_replytime<%=dataArray[i].preComment.id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].preComment.updateTime%>","two_replytime<%=dataArray[i].id%>")</script></p>'+
                    '</div>'+
                    '<div class="reply-floor1-content">'+
                        ':&nbsp;&nbsp;<%=dataArray[i].preComment.content%>'+
                    '</div>'+
            '</div>'+
            '<div class="reply-floor2">'+
                    '<%if(dataArray[i].account.avatarUrl!=null){%>'+
                    '<img src="researcher/<%=dataArray[i].account.avatarUrl%>" class="pic-small fl">'+
                    '<%}else{%>'+
                    '<img src="../static/images/photo2.png" class="pic-small fl">'+
                    '<%}%>'+
                    '<div class="fl reply-name-time">'+
                        '<p class="replyname"><%=dataArray[i].account.firstName%></p>'+
                        '<p class="replytime" id="three_replytime<%=dataArray[i].id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].updateTime%>","three_replytime<%=dataArray[i].id%>")</script></p>'+
                    '</div>'+
                    '<div class="reply-floor2-content">'+
                        'Reply:&nbsp;&nbsp;<%=dataArray[i].content%>'+
                    '</div>'+
                    '<textarea class="reply-textarea" placeholder="Reply <%=dataArray[i].account.firstName%> :"></textarea>'+
                    '<a href="javascript:void(0);" data="<%=dataArray[i].paper.id%>-<%=dataArray[i].id%>" class="sendbtn">Send</a>'+
            '</div>'+
        '<%}else{%>'+
            '<div class="reply-floor1">'+
                    '<%if(dataArray[i].account.avatarUrl!=null){%>'+
                    '<img src="researcher/<%=dataArray[i].account.avatarUrl%>" class="pic-small fl">'+
                    '<%}else{%>'+
                    '<img src="../static/images/photo2.png" class="pic-small fl">'+
                    '<%}%>'+
                    '<div class="fl reply-name-time">'+
                        '<p class="replyname"><%=dataArray[i].account.firstName%></p>'+
                        '<p class="replytime" id="two_replytime<%=dataArray[i].id%>"><script type="text/javascript">$.PIF_dateDiffFormat.getDateDiff("<%=dataArray[i].updateTime%>","two_replytime<%=dataArray[i].id%>")</script></p>'+
                    '</div>'+
                    '<div class="reply-floor1-content">'+
                        ':&nbsp;&nbsp;<%=dataArray[i].content%>'+
                    '</div>'+
                    '<textarea class="reply-textarea" placeholder="Reply <%=dataArray[i].account.firstName%> :"></textarea>'+
                    '<a href="javascript:void(0);" data="<%=dataArray[i].paper.id%>-<%=dataArray[i].id%>" class="sendbtn">Send</a>'+
            '</div>'+
        '<%}%>'+
        '</div>'+
    '<%}%>';